package talend.todayWork;

import static org.junit.Assert.assertFalse;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import Done.Util.Date.DateUtils;
import talend.util.Constant;
import talend.util.TalendUtil;

public class TestPrepareProductForTDI {

	private static String studio;
	
	@Before
	public void before() {
		System.out.println(DateUtils.getTimeString()+" before method");
	}

	@Test
	public void collectStoryFromJOB() {
		TalendToday.executePrepareProduct();
		TalendUtil.loadLicense(getStudio());
		if (Constant.isStudioBroken()) {
			System.out.println("\n\nthe server donot have studio, manual set job failed!!!\n\n");
			assertFalse("the server donot have studio, manual set job failed!!!", Constant.isStudioBroken());
		}
	}

	@After
	public void after() {
		System.out.println(DateUtils.getTimeString()+" after method");
	}

	public static String getStudio() {
		return studio;
	}

	public static void setStudio(String studio) {
		TestPrepareProductForTDI.studio = studio;
	}


}
